﻿Option Explicit On

Public Class frmReplace

    Private Sub cmdClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdClose.Click

        Me.Close()

    End Sub

    Private Sub frmReplace_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub cmdAReplace_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdAReplace.Click
        Dim ActiveForm As frmMain
        ActiveForm = DirectCast(frmMDIParent.ActiveMdiChild, frmMain)

        If chkAll.Checked = True Then
            If chkReg.Checked = False Then
                If chkLU.Checked = False Then
                    For Each Section In ActiveForm.iSection
                        Replace(Section.SectionContext, txtOrg.Text, txpRep.Text, , , CompareMethod.Text)
                    Next
                End If


            End If
        End If

    End Sub

End Class